<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页 - 示例服务器</title>
    <style>
        /* 简单美化样式 */
        body {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            line-height: 1.6;
        }

        .nav {
            margin: 20px 0;
            padding: 10px;
            background-color: #f5f5f5;
            border-radius: 4px;
        }

        .nav a {
            margin-right: 20px;
            text-decoration: none;
            color: #0d6efd;
        }

        .nav a:hover {
            text-decoration: underline;
        }

        .form-container {
            margin-top: 30px;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }

        input[type="text"],
        input[type="password"] {
            width: 100%;
            padding: 8px;
            margin: 8px 0 15px;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        input[type="submit"] {
            background-color: #0d6efd;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        input[type="submit"]:hover {
            background-color: #0a58ca;
        }
    </style>
</head>

<body>
    <h1>欢迎使用示例服务器</h1>

    <!-- 导航链接 -->
    <div class="nav">
        <a href="/">首页</a>
        <a href="/hello">测试接口</a>
        <a href="/login">登录</a>
    </div>

    <!-- 功能说明 -->
    <div class="intro">
        <p>本服务器支持以下功能：</p>
        <ul>
            <li>静态资源访问（如本页面）</li>
            <li>用户登录功能（下方表单）</li>
            <li>API接口测试（<a href="/hello">/hello</a>）</li>
        </ul>
    </div>

    <!-- 登录表单 -->
    <div class="form-container">
        <h2>用户登录</h2>
        <form action="/login" method="post">
            <label for="username">用户名：</label><br>
            <input type="text" id="username" name="username" required><br>

            <label for="password">密码：</label><br>
            <input type="password" id="password" name="password" required><br><br>

            <input type="submit" value="登录" name="submit">
        </form>
    </div>
</body>

</html>